﻿using System.Data.Entity.ModelConfiguration;
using PizzaMario.Domain.Entities;
using System.ComponentModel.DataAnnotations.Schema;

namespace PizzaMario.Domain.Mapping
{
    public class ToppingMap : EntityTypeConfiguration<Topping>
    {
        public ToppingMap()
        {
            //Sets primary key configuration
            HasKey(t => t.ToppingId);

            //Properties
            Property(t => t.Name).HasMaxLength(100);

            //Configures table name where entity is mapped to
            ToTable("Toppings");
        }
    }
}
